﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class Property
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public Property(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateProperty(this);
        }
        public List<Property> GetAllPropertiesByUserId(int userId)
        {
            return _dataObject.GetAllPropertiesByUserId(userId);
        }
        public void GetPropertyById()
        {
            _dataObject.GetPropertyById(this);
        }
        public List<Property> GetAllProperties()
        {
            return _dataObject.GetAllProperties();
        }
        public void AssignBuilder()
        {
            _dataObject.AssignBuilder(this);
        }
        public void AssignArchitect()
        {
            _dataObject.AssignArchitect(this);
        }
    }
}
